﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SnakeGame
{
    class Field
    {

        private Point _first;
        private Point _last;
        private List<Point> _border;

        public Field(Point p)
        {
            _border = new List<Point>();
            _first = new Point(1, 1);
            _last = p;
            this.MakeBorder();
        }

        void MakeBorder()
        {
            for (int i = this._first.Y; i <= this._last.Y; i++)
            {
                _border.Add(new Point(this._first.X, i));
                _border.Add(new Point(this._last.X, i));
            }

            for (int i = this._first.X; i <= this._last.X; i++)
            {
                _border.Add(new Point(i, this._first.Y));
                _border.Add(new Point(i, this._last.Y));
            }
        }

        public List<Point> Border
        {
            get { return _border; }
        }
    }

}
